package com.miku.blog.controller;

import com.miku.blog.annotation.SystemLog;
import com.miku.blog.domain.pojo.ResponseResult;
import com.miku.blog.service.EmailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @create ${}YEAR-06-16 23:56
 */
@Api(tags = "Blog[获取邮箱验证码]")
@RestController
public class EmailController {


    @Autowired
    private EmailService emailService;


    @SystemLog(notes = "发送邮箱验证码")
    @ApiOperation(value = "发送邮箱验证码接口")
    @GetMapping("/users/code")
    public ResponseResult sendEmail(@RequestParam("email") String email,
                                    @RequestParam("sendStatus") Integer sendStatus){
        return emailService.sendEmail(email,sendStatus);
    }


}
